<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

Route::post('/login','IndexController@login');

Route::middleware(['api.auth:api'])->group(function(){
    Route::get('/order','IndexController@orders');
    Route::post('/order','IndexController@add');
    Route::get('/order/{sn}','IndexController@info');
    Route::post('/pay/{sn}','IndexController@pay');
    Route::get('/pay/{sn}','IndexController@payInfo');
    Route::delete('/pay/{sn}','IndexController@cancel');
});
